import { createRouter, createWebHistory } from "vue-router";

// 引入
import Login from "../views/login.vue";
import Admin from "../views/admin.vue";
// 路由信息
let routes = [
    {
        path: "/login",
        name: 'Login',
        component: Login,
    },{
       path:"/",
        redirect:"/login",
    },{
        path:"/admin",
        name:'Admin',
        component:Admin,
    }
    // ,
    // {
    //     path: "/home",
    //     name: 'home',
    //     component: Home,
    // },
    // {
    //     path: "/about",
    //     name: 'about',
    //     component: About,
    // },
];

// 路由器
const router = createRouter({
    history: createWebHistory(), // HTML5模式
    routes,
});

export default router;
